/**
 * Created by Administrator on 2017/12/18.
 */



function aaa(){
	
    var LOGINNAME = $("input[name='logname']").val();
    var PASSWORD = $("input[name='logpass']").val();

    if (LOGINNAME == "" || PASSWORD == "") {
        swal('用户名、密码都不能为空!');
        return;
    }
    var url=addhead+"login";

    $.ajax({
        url : url,
        type : "POST",
        data : {
            "username" : LOGINNAME ,
            "password"   :PASSWORD
        },
        dataType : "json",
        success : function(data) {
            if (data==1){
                window.location.assign("home.html")
            }else{
                swal('密码错误');
            }
        },
        error : function() {
            swal('数据读取失败');
        }
    });

}

function addloginRecord(){
    var url=addhead+"addloginRecord";
    ajax(url)
}
